package com.jdrx.sw.sewage.common.enums;

import org.apache.commons.lang3.StringUtils;

public enum EControllableDevType {
    C("C", "设备控制"),
    S("S", "参数设置"),
    Y("Y", "仪表"),
    T("T", "状态"),
    P("P", "PLC");

    private String key;
    private String value;
    
    public static String getValue(String key) {
    	EControllableDevType[] enums = EControllableDevType.values();
    	for(EControllableDevType typeEnum : enums) {
    		if(StringUtils.equals(typeEnum.getKey(), key)) {
    			return typeEnum.getValue();
    		}
    	}
    	return "";
    }

    EControllableDevType(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
